home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / mouse01g.zip / MOUSE0G.DOC < prev    next >
Text File  |  1992-05-24  |  5KB  |  99 lines

  1.            Mouse Driver for Programs that use the Cursor Keys
  2.                          Answers this question:
  3.            "How can I use the mouse in my current programs?"
  4.  
  5. Purpose:
  6.          TSR makes the mouse useful in programs that don't support a
  7.          mouse. Put mouse support into C program source that uses cursor
  8.          keys. Source applys to expanded keyboard buffers. It features
  9.          "lock-on" horizontal and vertical mouse moves.
  10.  
  11. Simtel20 Title: "Biased mouse TSR emulates cursor keys /w SRC"
  12.  
  13. Version: 15 Feb 1992 [prev: 1 December 1991]
  14. Authors: Grant B. Gustafson
  15.          113JWB Math.Dept. Univ of Utah SLC, UT 84112
  16.          Other authors will be added here as contributions are made.
  17. email:   gustafso@math.utah.edu (Internet address)
  18.  
  19. Copyright:
  20.          The source code is owned by the author. It may be used
  21.          for educational purposes without limitation. Modified versions
  22.          of the sources are considered private copies and should bear
  23.          the new authors names but not the present author's name.
  24. Credits:
  25.          If you use this source code in your own sources, then the new
  26.          source becomes yours. You are under no obligation to give
  27.          credit or cite copyrights. If you make a change to the sources
  28.          that everyone should know about, then email a change order and
  29.          request your name to be added to the author list.
  30. Cost:
  31.          There is no charge, license fee or obligation. If someone makes
  32.          you pay for this, then it violates the intent of the author.
  33.  
  34. Responsibility:
  35.  
  36.          This computer program is used at your own risk. If you use it,
  37.          then you assume responsibility for anything that happens as a
  38.          result of the program operation, including but not limited to
  39.          programming errors, faulty operation, file system destruction.
  40.          The authors are not responsible.
  41.  
  42. SOURCE mouse0g.asm:
  43. This program gives simple mouse support to DOS programs that use the
  44. cursor keys. Mouse moves result in stuffing the keyboard buffer with
  45. cursor keys. When compiled it results in a TSR program.
  46.  
  47.  
  48. SOURCE mouse1g.c:
  49. This program gives simple mouse support to DOS programs that use the
  50. cursor keys. Mouse moves result in stuffing the keyboard buffer with
  51. cursor keys. It is designed to be inserted into a C program source.
  52. While functionally equivalent to mouse0g.asm, it consists of C routines
  53. and special startup and exit routines to be called from C.
  54.  
  55.  
  56. SOURCE mouse2g.asm:
  57. Same as mouse0g.asm, except it removes itself from memory upon demand.
  58. To understand the program source, read the source for mouse0g.asm first.
  59.  
  60.  
  61. Usage:
  62. First load the mouse driver supplied by the mouse manufacturer. Run the
  63. TSR program and then your cursor key application. A custom specially
  64. compiled C program using source mouse1g.c does not use the TSR and
  65. therefore runs standalone.
  66.  
  67. Assembly of ASM source:
  68. To assemble one of the ASM programs, use TASM or MASM to make the OBJ
  69. file, then use TLINK /t or DOS LINK and EXE2BIN to create the COM file.
  70.  
  71. Assembly of custom C source:
  72. To assemble the C source into your progam source, making a stand-alone
  73. program that uses the mouse, copy the source into your program module
  74. and then alter your source code as follows:
  75.  
  76.    Startup: Call mousereset(). Call mousehook(). Mouse setup done!
  77.    Menus: If you enter a menu, where mouse action should be slower,
  78.           then call menumouse(1). On menu exit call menumouse(0).
  79.           The latter sets the mouse speed to normal.
  80.    Exit:  Upon program exit call mousereset(). This resets the
  81.           mouse driver (either a device or tsr from mouse manufacturer)
  82.           interrupt service routine that was set by mousehook().
  83.  
  84. See moustest.c for a simple sample program that uses cursor keys and
  85. also the mouse interface.
  86.  
  87. As presently written, TURBO-C is required. However, it is easy to modify
  88. the source for assembly with MSC 6.0. Your source code must use cursor
  89. keys, return and ESC keys in order to test all functions of the mouse
  90. routine. In TURBO-C this means your source probably gets keyboard input
  91. from the function getch() and you are parsing for two-byte function keys
  92. UP==(0,H), RIGHT==(0,M), DOWN==(0,P), LEFT==(0,K). If no parsing is
  93. done, then likely your program can recognize from the mouse only the
  94. RETURN key and the ESC key (left and right mouse buttons).
  95.  
  96. Manual by:
  97. Grant B. Gustafson
  98. Last manual revision 24 May 1992
  99.